<h:html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://xmlns.jcp.org/jsf/html"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:b="http://bootsfaces.net/ui"
      xmlns:p="http://primefaces.org/ui">
<h:head></h:head>
<h:body>
	<ui:composition>
		<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="container-fluid col-md-10 col-md-offset-1">
				<div class="navbar-header">
				
					<c:if test="#{not empty user}">
						<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-6">
							<span class="sr-only">Toggle navigation</span>
							<span class="icon-bar"></span>
							<span class="icon-bar"></span>
							<!-- <span class="icon-bar"></span> -->
						</button>
					</c:if>					
					
					<a class="navbar-brand" href="#{request.contextPath}">
						<img class="navbar-brand-img" src="#{request.contextPath}/imgs/brand.png" />
						<h2 class="navbar-brand-text">MeteoCal</h2>
					</a>
				</div>

				<c:if test="#{not empty user}">
					<div class="collapse navbar-collapse navbar-right" id="bs-example-navbar-collapse-6">
						<!-- <form class="navbar-form navbar-left" role="search">
							<div class="input-group">
								<input type="text" class="form-control" placeholder="Search for..." />
								<span class="input-group-btn">
								<button class="btn btn-default" type="button">Go!</button>
							</span>
							</div>
						</form> -->
						
						<ul class="nav navbar-nav">
							<li><a href="#{request.contextPath}/user/">#{userBean.name}</a></li>
							<li><h:form><p:commandLink action="#{loginBean.logout()}" value="Logout" /></h:form></li>
						</ul>
					</div>
				</c:if>
			</div>
		</nav>
	</ui:composition>
</h:body>
</h:html>